package ya.ru.kolemik;

import org.codehaus.plexus.configuration.PlexusConfiguration;

public class Plugin {
 
    /**
     * @required
     * @parameter
     */
    private String artifactId;
    
    /**
     * @parametr
     */
    private PlexusConfiguration configuration;
   
    /**
     * @parameter
     */
    private String groupId;

    /**
     * @required
     * @parameter
     */
    private String version;

    /**
     * @required
     * @parameter
     */
    private String goal;
    
    public PlexusConfiguration getConfiguration() {
        return configuration;
    }

    public String getArtifactId() {
        return artifactId;
    }

    @Override
    public String toString() {
        if (groupId != null && artifactId != null) {
            return groupId + "." + artifactId;
        } else {
            return super.toString();
        }
    }

    public String getGroupId() {
        if (groupId != null) {
            return groupId;
        } else {
            return "org.apache.maven.plugins";   
        }
    }

    public String getVersion() {
        return version;
    }

    public String getGoal() {
        return goal;
    }
}
